home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / internet-tools / amitcp / gpdial / scripts / disconnect.gpdscript < prev    next >
Encoding:
Text File  |  1995-06-05  |  878 b   |  37 lines

  1. ; Filename : Disconnect.GPDScript
  2. ;
  3. ; This script will attempt to disconnect you from the net
  4. ; by calling "Stopnet" and then hanging up the modem.
  5. ; To run it use:
  6. ;
  7. ;     GPDial -nc AmiTCP:Scripts/Disconnect.GPDScript
  8. ;
  9. ; If you do this from a shell remember and change your stack to 10000 bytes
  10. ; with "stack 10000"
  11. ;
  12. ;     n = no startup script
  13. ;     c = don't open serial port (because AmiTCP will have it open)
  14. ;
  15.  
  16.     show ABORT ALL
  17.     print "Attempting to disconnect"
  18.     execute "AmiTCP:bin/Stopnet" failed
  19.     pause 2
  20.     setser $GPD_BAUD $GPD_DATA $GPD_STOP $GPD_PARITY
  21.     send $GPD_HANGUP
  22.     wait "OK" 2 error
  23.     send "AT&D2\r"
  24.     wait "OK" 2 error
  25.     print "You are now disconnected"
  26.     quit
  27. ;
  28. lab failed:
  29.     printerror "Can't execute \"stopnet\"\nYou will have to hangup\nthe modem manualy"
  30.     quit
  31. ;
  32. lab error:
  33.     printerror "Error hanging up modem\nYou will have to do it manualy"
  34.     quit
  35. ;
  36. ; EOF
  37.